package com.enums;

import java.util.function.Supplier;

/**
 * @author ANG.YU
 * @date 2020-08-06 10:11
 */
public class EnumImplementation {
    public static <T> void printNext(Supplier<T> rg) {
        System.out.print(rg.get()+", ");
    }

    public static void main(String[] args) {
        CartoonCharacter cc = CartoonCharacter.BOB;
        for (int i = 0; i < 10; i++) {
            printNext(cc);
        }
    }
}
